
<html>
<head>
<meta charset="UTF-8">
<title>选择选项信息列表</title>
<link href="../../static/easyui/themes/bootstrap/easyui.css" rel="stylesheet" type="text/css"/>
<link href="../../static/easyui/themes/icon.css" rel="stylesheet" type="text/css"/>
<script src="../../static/easyui/jquery.min.js" type="text/javascript"></script>
<script src="../../static/easyui/jquery.easyui.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../static/easyui/locale/easyui-lang-zh_CN.js" type="text/javascript"></script>
<script src="../../static/plugin/assets/jslib.util.js" type="text/javascript"></script>
<script src="../../static/plugin/assets/jslib.jquery.ajax.js" type="text/javascript"></script>
<script src="../../static/plugin/assets/jslib.easyui.util.js" type="text/javascript"></script>
<script src="../../ffres/dict/all.js"></script>
<a href="" target="_blank" id="commonLink" name="commonLink"></a>
</head>
<script type="text/javascript">

	function doView(){
		var row = $('#dg').datagrid('getSelected');
		if (row) {
			JLEUtil.createModalWin('详情','DictOptionInfoView.html?' + '&dictId=' + row.dictId);
		} else {
			$.messager.alert('提示','请选择一条记录！','info');
		}
	}
	
	function doRefList() {
		var row = $('#dg').datagrid('getSelected');
		if (row) {
			JLEUtil.createModalWin('数据选项被引用情况', 'DictOptionInfoByRef.html?dictId=' + row.dictId);
		} else {
			$.messager.alert('提示','请选择数据选项！');
		}
	}

	function doReturnChoice() {
		var row = $('#dg').datagrid('getSelected');
		if (row){
				window.parent.doFinishOptionChoice(row.dictId,row.dictCode);
		} else {
			$.messager.alert("请选择数据选项！");
		}
	}
	$(function() {
		$('#dg').datagrid({
		    onDblClickRow: function (rowIndex, rowData) {
		    	doReturnChoice();
		    }
		});		
		$('#btnQuery').click();
	})	
</script>
</head>
<body class="easyui-layout">
<div data-options="region:'north',title:''" style="height: 40px; background: #F4F4F4;">
	<form id="searchForm">
		<table>
			<tr>
				<td>&nbsp;选项代码：</td>
				<td><input name="dictCode" id="dictCode"/></td>
				<td>&nbsp;选项名称：</td>
				<td><input name="dictName" id="dictName"/></td>				
				<td><a class="easyui-linkbutton" href="javascript:void(0);" onclick="JLEUtil.queryForm('searchForm','dg','../../api/dict/option/infos');">查找</a></td>
				<td><a class="easyui-linkbutton" href="javascript:void(0);" onclick="JLEUtil.clearForm('searchForm');">清空</a></td>
			</tr>
		</table>
	</form>
</div>
<div data-options="region:'center',split:false">
<table id="dg" class="easyui-datagrid" title="" style="width:100%;height:100%"
			data-options="singleSelect:true,collapsible:true,url:'../../api/dict/option/infos',method:'post'"
			toolbar="#tb"
		title="Load Data"
		rownumbers="true" pagination="true" pageSize="20">
		<thead>
			<tr>
				<th data-options="field:'dictCode',resizable:true" width="13%">选项代码</th>
				<th data-options="field:'dictName',resizable:true" width="15%">选项名称</th>
				<th data-options="field:'dictType',resizable:true" width="10%" formatter="formatter_DM_DICT_TYPE">选项类型</th>
				<th data-options="field:'dictIsStd',resizable:true" width="6%" formatter="formatter_STD_PUB_YN">是否国际</th>
				<th data-options="field:'createUser',resizable:true" width="10%">创建者</th>
				<th data-options="field:'createTime',resizable:true" width="13%">创建时间</th>				
				<th data-options="field:'refCount',resizable:true" width="8%">被引用次数</th>
				<th data-options="field:'subjectId',resizable:true" width="10%">所属主题</th>
				<th data-options="field:'dictRemarks',resizable:true" width="20%">数据选项备注</th>
			</tr>
		</thead>
	</table>
</div>
<div data-options="region:'south',split:false" title="" style="width:100%;height:60px;background: #F4F4F4;">
	<div style="text-align:center;padding:10px">
		 <a href="javascript:doReturnChoice()" class="easyui-linkbutton">&nbsp;&nbsp;&nbsp;&nbsp;确&nbsp;&nbsp;&nbsp;&nbsp;定&nbsp;&nbsp;&nbsp;&nbsp;</a>
		 <a href="javascript:window.parent.JLEUtil.closewin();" class="easyui-linkbutton">&nbsp;&nbsp;&nbsp;&nbsp;取&nbsp;&nbsp;&nbsp;&nbsp;消&nbsp;&nbsp;&nbsp;&nbsp;</a>
	</div>
</div>
<div id="tb" style="padding:1px">
	<div style="margin-bottom:2px">
		<a href="javascript:doView();" class="easyui-linkbutton" iconCls="icon-ok" plain="true">查看选项</a>
		<a href="javascript:doRefList();" class="easyui-linkbutton" iconCls="icon-man" plain="true">选项被引用明细</a>
	</div>
</div>
</body>
</html>

